﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Util
{
    public class Format
    {
        /*

          {0:d} -->> 13/03/2009

          {0:D} -->> viernes, 13 de marzo de 2009

       */

        public string date(DateTime date, string format)
        {
            return string.Format(format, date);
        }
        
        public string money(string value)
        {

            //decimal aux = System.Convert.ToDecimal(value);

            decimal aux = decimal.Parse(value);

            return this.money(aux);

        }

        public string money(int value)
        {
            return string.Format("{0:c} ", value);
        }

        public string money(long value)
        {
            return string.Format("{0:c} ", value);
        }

        public string money(float value)
        {
            return string.Format("{0:c} ", value);
        }

        public string money(decimal value)
        {
            return string.Format("{0:c} ", value);
        }

        public string money(double value)
        {
            return string.Format("{0:c} ", value);
        }

        public string text(string txt, string[] argumentos)
        {
            return String.Format(txt, argumentos);
        }

    }
}